﻿using System;
using System.Linq;
using Dapper;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Project.Common;
using Project.Data;
using Project.IData;
using Project.Model;

namespace Project.UnitTest
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
            #region TestData

            //IEmployeeData employee = SimpleDataFactory.GetEmployeeData();
            //Employee e = new Employee();
            //e.LoginName = "admin";
            //e.LoginPwd = "123";
            //var x = employee.Create(e);
            //Assert.AreEqual(x > 0, true);

            //IUserInfoData userInfoData = SimpleDataFactory.GetUserInfoData();
            //UserInfo userInfo = new UserInfo();
            //userInfo.UserName = "123";
            //userInfo.ActionInfo=new ActionInfo(){ Id = 1};
            //userInfo.Address = "123";
            //userInfo.Age = 18;
            //userInfo.CreateTime = DateTime.Now;
            //userInfo.Employee=new Employee(){Id = 1};
            //userInfo.Phone = "123123";
            //userInfo.Gender = Gender.男;

            //var x = userInfoData.Create(userInfo);
            //Assert.AreEqual(x > 0, true);

            #endregion

            #region OracleTest

            //using (var connection =MyDapper.GetOracleConnection())
            //{
            //    var x= connection.Query("select * from userinfo").FirstOrDefault();
            //}

            #endregion

        }
    }
}
